package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 后台操作日志表
 * </p>
 *
 * @author 作者
 * @since 2022-11-25
 */
@Getter
@Setter
@TableName("admin_operation_log")
@ApiModel(value = "AdminOperationLog对象", description = "后台操作日志表")
public class AdminOperationLog extends Model<AdminOperationLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("操作日志表id")
      @TableId(value = "admin_operation_log_id", type = IdType.AUTO)
    private Integer adminOperationLogId;

    @ApiModelProperty("描述")
    @TableField("log_description")
    private String logDescription;

    @ApiModelProperty("操作类型 1: 新增 2: 修改 3: 删除 4: 查询 5: 未知")
    @TableField("log_type")
    private Integer logType;

    @ApiModelProperty("操作模块 1:未知，2:删除数据字典")
    @TableField("log_module")
    private Integer logModule;

    @ApiModelProperty("根据访问路径截取，作为模块名称")
    @TableField("log_module_name")
    private String logModuleName;

    @ApiModelProperty("入参")
    @TableField("log_params")
    private String logParams;

    @ApiModelProperty("操作结果(出参)")
    @TableField("log_result")
    private String logResult;

    @ApiModelProperty("核心参数")
    @TableField("log_core_params")
    private String logCoreParams;

    @ApiModelProperty("操作内容")
    @TableField("log_content")
    private String logContent;

    @ApiModelProperty("请求路径")
    @TableField("log_url")
    private String logUrl;

    @ApiModelProperty("代码路径")
    @TableField("log_path")
    private String logPath;

    @ApiModelProperty("耗时(ms)")
    @TableField("cost_time")
    private String costTime;

    @ApiModelProperty("日志等级")
    @TableField("log_level")
    private Integer logLevel;

    @ApiModelProperty("操作人")
    @TableField("operation_user_id")
    private Integer operationUserId;

    @ApiModelProperty("创建时间（操作时间）")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("是否删除 默认0不删除")
    @TableField("is_delete")
    private Integer isDelete;


    @Override
    public Serializable pkVal() {
        return this.adminOperationLogId;
    }

}
